package se.chalmers.tda366.crumble.gui.dialogs;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.JPanel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class GreyoutPanel extends javax.swing.JPanel {
	
	private Dimension paintDimension;
	private JPanel innerPanel;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	
	public GreyoutPanel() {
		super();
		paintDimension = new Dimension(0,0);
		initGUI();
	}
	
	private void initGUI() {
		this.setOpaque(false);
		addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
            	catchMouseMovement(evt);
            }
        });
	}
	
	public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        Color ppColor = new Color(0, 0, 0, 170); //r,g,b,alpha
        g.setColor(ppColor);
        g.fillRect(0,0,2000,2000); //x,y,width,height
    }
	
	public void setPaintDimension(Dimension dimension) {
        paintDimension = dimension;
    }

    public Dimension getPaintDimension() {
        return paintDimension;
    }
    
    public void setInnerPanel(JPanel innerPanel) {
    	this.innerPanel = innerPanel;
    }
    
    public JPanel getInnerPanel() {
    	return innerPanel;
    }
    
    private void catchMouseMovement(java.awt.event.MouseEvent evt) {                                
        //void to catch all mouse movements.
    }

}
